﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:DiagramDesigner">

    <Style TargetType="local:ResizeThumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ResizeThumb">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Thumb x:Name="thumb"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="MoveThumb" TargetType="Thumb">
        <Rectangle Fill="Transparent"/>
    </ControlTemplate>

    <Style TargetType="local:MoveThumb">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MoveThumb">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Thumb x:Name="thumb" Template="{StaticResource MoveThumb}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:RotateThumb">
        <!--<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="Cursor" Value="Hand"/>-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RotateThumb">
                	<Grid Width="30" Height="30">
                		<Path Fill="#AAD0D0DD" Stretch="Fill" Data="M 50,100 A 50,50 0 1 1 100,50 H 50 V 100"/>
                	</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
    </Style>
</ResourceDictionary>
